package pkg_member

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type JoinactivateRouter struct {
}

// InitJoinactivateRouter 初始化 参加活动 路由信息
func (s *JoinactivateRouter) InitJoinactivateRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	joinactivateRouter := Router.Group("joinactivate").Use(middleware.OperationRecord())
	joinactivateRouterWithoutRecord := Router.Group("joinactivate")
	joinactivateRouterWithoutAuth := PublicRouter.Group("joinactivate")

	var joinactivateApi = v1.ApiGroupApp.Pkg_memberApiGroup.JoinactivateApi
	{
		joinactivateRouter.POST("createJoinactivate", joinactivateApi.CreateJoinactivate)             // 新建参加活动
		joinactivateRouter.DELETE("deleteJoinactivate", joinactivateApi.DeleteJoinactivate)           // 删除参加活动
		joinactivateRouter.DELETE("deleteJoinactivateByIds", joinactivateApi.DeleteJoinactivateByIds) // 批量删除参加活动
		joinactivateRouter.PUT("updateJoinactivate", joinactivateApi.UpdateJoinactivate)              // 更新参加活动
	}
	{
		joinactivateRouterWithoutRecord.GET("findJoinactivate", joinactivateApi.FindJoinactivate)       // 根据ID获取参加活动
		joinactivateRouterWithoutRecord.GET("getJoinactivateList", joinactivateApi.GetJoinactivateList) // 获取参加活动列表
	}
	{
		joinactivateRouterWithoutAuth.GET("getJoinactivatePublic", joinactivateApi.GetJoinactivatePublic) // 获取参加活动列表
	}
}
